// app.js
import './utils/utils'
import './utils/http'
App({
  // 全局变量，保存用户 token 信息
  userInfo:{avatar: '', name: '李明',number:'67409881',phone:'177 9998 8765',completedAmounts:'16', taskAmounts:'18', transportMileage:'3897'},
  getToken(){
    return wx.getStorageSync('token')
  },
  setToken(type,value){
     this.type = value
     wx.setStorageSync(type, value)
  },
   // 小程序启动时执行的函数
   onLaunch: function() {
    // 从本地存储中获取用户的 Token 信息
    const token = wx.getStorageSync('token') || '';
    this.globalData = token;
  },
  globalData: {}
})
